package com.wyw.springcloud;

import com.wyw.springcloud.common.bean.Student;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 文件介绍
 *
 * @Author： Mr Wu （yewen.wu.china.gmail.com）
 * @Date: 2020/9/28 9:40
 */
@FeignClient("feign-client")
public interface IService {
    @GetMapping("/sayHi")
    String sayHi();

    @PostMapping("/sayHi")
    Student sayHiPost(@RequestBody Student friend);

    @GetMapping("/retry")
    String retry(@RequestParam(name = "timeout") int timeout);

    @GetMapping("/error")
    String error();
}
